import CarouselPreview from "../preview"
import CarouselConfig from "../config"
import { DRAG_TYPE } from '../../../../dnd/drag_type'
import { nanoid } from 'nanoid'

const CarouselScheme = {
  meta: {
    id: nanoid(),
    parent: null,
    // key: Math.random(),
    sort: 0,
    name: 'Carousel',
    title: '轮播图',
    type: DRAG_TYPE.public,
    componentPreview: CarouselPreview,
    componentConfig: CarouselConfig
  },
  config: {
    attr: {
      autoplay: true,
      dots: true,
      dotPosition: 'bottom',
      effect: 'scrollx',
      speed: 500
    },
    style: {
      height: '150px',
      width: '100%'
    }
  },
  data: {
    raw: {
      list: [
        {
          url: "https://dummyimage.com/600x300/00ddff",
          link: '',
        }, {
          url: "https://dummyimage.com/600x300/ffaadd",
          link: '',
        }, {
          url: "https://dummyimage.com/600x300/dd00ff",
          link: '',
        }, {
          url: "https://dummyimage.com/600x300/0df0df",
          link: '',
        }
      ]
    },
    context: null
  }
}

export default CarouselScheme;